In current systems, depending on how the object instances of a particular class are used, there are usually multiple member variables that are rarely used. These rarely-used member variables usually consume a significant amount of heap space. Indeed, for certain heap dumps, up to—or even more than—25% of the heap may be used by such rarely-used member variables. Currently, the only recognized solution is to add more memory, e.g., RAM, to the target machine(s), but such action necessarily requires additional hardware components and, consequently, results in overall increased cost of the system. Indeed, there are currently no known mechanisms for reducing the heap impact of rarely-used member variables.
Accordingly, there remains a need for a way to address these and other deficiencies associated with the prior art.